using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ProductDetail : System.Web.UI.UserControl
{
    processProduct pProduct;
    protected void Page_Load(object sender, EventArgs e)
    {
        string ProductID = Request.QueryString["ProductID"];
        pProduct = new processProduct();
        Load_ProductDetail(ProductID);

    }
    public void Load_ProductDetail(string ProductID)
    {
        DataTable dtProduct = pProduct.getProductByID(ProductID);
        lblProductName.Text = dtProduct.Rows[0]["ProductName"].ToString();
        imgProductImage.ImageUrl = "Images/" + dtProduct.Rows[0]["ProductImage"].ToString();
        lblProductDetail.Text = dtProduct.Rows[0]["ProductDetail"].ToString();
        lblProductPrice.Text = dtProduct.Rows[0]["ProductPrice"].ToString();
        lblProductQuantity.Text = dtProduct.Rows[0]["ProductQuantity"].ToString();
        lblProductWarranty.Text = dtProduct.Rows[0]["ProductWarranty"].ToString();
        ibtAddtoCart.PostBackUrl = "index.aspx?subpara=addtocart&ProductID=" + dtProduct.Rows[0]["ProductID"].ToString();
    }
    
}
